class WaterHeater {
    private boolean isOn;
    private boolean isBroken;
    private double temperature;
    private boolean hasWater;

    public WaterHeater() {
        isOn = false;
        isBroken = false;
        temperature = 0;
        hasWater = false;
    }

    public void checkStatus() {
        if (!isOn) {
            if (isBroken) {
                System.out.println("烧坏");
            } else {
                System.out.println("未启动的");
            }
        } else {
            if (isBroken) {
                System.out.println("烧坏");
            } else {
                if (temperature < 20 && hasWater) {
                    System.out.println("烧水");
                } else if (temperature >= 100) {
                    System.out.println("不烧水");
                } else {
                    System.out.println("已启动的");
                }
            }
        }
    }

    public void setOn(boolean on) {
        if (on) {
            if (!isOn) {
                isOn = true;
                // 假设早上7点启动
                if (temperature == 0 &&!isBroken) {
                    System.out.println("早上7点启动");
                }
            }
        } else {
            if (isOn) {
                isOn = false;
                // 假设23点自动断电
                if (temperature > 0 &&!isBroken) {
                    System.out.println("23点自动断电");
                }
            }
        }
    }

    public void setBroken(boolean broken) {
        isBroken = broken;
        if (isBroken) {
            System.out.println("烧坏");
        }
    }

    public void setTemperature(double temperature) {
        this.temperature = temperature;
    }

    public void setHasWater(boolean hasWater) {
        this.hasWater = hasWater;
    }
}

public class Hotwater {
    public static void main(String[] args) {
        WaterHeater heater = new WaterHeater();
        // 模拟未启动状态
        heater.checkStatus();
        // 模拟启动
        heater.setOn(true);
        heater.setHasWater(true);
        heater.setTemperature(15);
        heater.checkStatus();
        // 模拟水烧开
        heater.setTemperature(100);
        heater.checkStatus();
        // 模拟断电
        heater.setOn(false);
        heater.checkStatus();
    }
}